import zipfile

import io
import msvcrt
import os

msvcrt.setmode( 0, os.O_BINARY )

fp = zipfile.ZipFile( 'py.zip', 'r' )

fp.extractall()

data = fp.read( 'py1.ico' )

fp2 = open( 'py1.ico', 'wb' )

fp2.write( data )

fp2.close()

# print( data )